By car
The Beltway and its main arteries I-270 and I-95 are the best way to travel between the three counties of the Capital Region. I-270 is a very convenient highway for traveling between Montgomery and Frederick Counties, and there's really no better way to go between the two. Unfortunately, there is an odd lack of east west routes other than the Beltway, which lends to the extreme congestion between Prince George's and Montgomery Counties and the extreme ire that engenders in the hapless, motionless drivers.
Many drivers unaccustomed to the Beltway find its banked curves with traffic going 65-75 miles per hour with little to no space between cars alarming and unpleasant to terrifying. A good tip for avoiding the Beltway in moving between PG and Montgomery Counties is to take the East-West Highway instead.
By Metro
The fabled Purple Line, which would mimic the Beltway in connecting the suburban areas to one another, is always under proposition and discussion, but may never come to light in the face of fierce opposition by homeowners that it would displace. So to connect by rail between PG and Montgomery Counties, you have to take the Red Line all the way into downtown D.C. to transfer to the Green Line. Just to go from Bethesda to Silver Spring which are practically adjacent, you would have to ride for an hour through D.C. on the Red Line.
So take buses instead if you are using public transportation. The bus system is quite good and comprehensive. Use the county Ride On buses to go from point to point within Montgomery County, and the WMATA metro buses in traveling in between the two inner counties.